package vn.com.bookstore.activity;

import vn.com.bookstore.BookStoreApplication;
import vn.com.bookstore.ConnectActivity;
import vn.com.bookstore.R;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.view.View;
import android.view.WindowManager.LayoutParams;

public class TutorialDialog extends ConnectActivity{
	@Override
	protected void onCreate(Bundle arg0) {
		super.onCreate(arg0);
		getWindow().setLayout(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT);
		setContentView(R.layout.activity_tutorial);
		
	}
	
	public void btnClicked(View v){
		
		mApplication.setValue(BookStoreApplication.KEY_FIRST_RUN, false);
		this.finish();
		new Handler().postDelayed(new Runnable() {
			
			@Override
			public void run() {
				Intent closeTut = new Intent(ConnectActivity.INTENT_ACTION);
				closeTut.putExtra("message", "close tut");
				sendBroadcast(closeTut);
			}
		}, 50);
	}
}
